SWEN-340

MIDI Parse Delay

Overview

This homework assignment is to give you experience parcing writing code to parse a MIDI track event delay value.

Setup

In a file named hw8.c write the function uint32_t paseDelay (uint8_t* delay) that parses the bytes starting at delay and returns the integer value for the delay. See Section 1.1 of the MIDI spec for details on working with variable length fields.

Test your code using the following midi messages:

   0x3B 0x80 0x27 0x00 -> Delay of 59
   0x83 0x18 0x91 0x54 0x64 -> Delay of 408
   0xC5 0x92 0x74 0xE3 0x74 0x12 -> Delay of 1132916
   0x90 0x82 0x93 0x64 0xD3 0x89 - > Delay of 33589732
Submission

Submit your solution by pushing the hw8.c file to the course repo by the deadline.

Grading

To receive full credit, Code must compile and run as expected without any warnings.